package com.example.demo.exception;

/**
 * 业务异常类
 *
 * @author liweiwei
 * @company GeekPlus
 * @project ark
 * @date 2018/10/15
 */
public class BizException extends RuntimeException {

    /**
     * 错误代码
     */
    private BizErrorCode errorCode;

    /**
     * 业务异常构造器
     *
     * @param errorCode 错误码
     */
    public BizException(BizErrorCode errorCode) {
        super(String.valueOf(errorCode));
        this.errorCode = errorCode;
    }

    public BizErrorCode getErrorCode() {
        return errorCode;
    }

}
